from time import sleep

from selenium.webdriver.chrome.webdriver import RemoteWebDriver
from selenium.webdriver.chrome.options import Options

from selenium.webdriver import Remote
def test_seleniumgrid():
    driver = Remote(command_executor="http://192.168.1.243:5001/wd/hub",
                    desired_capabilities={'platform': 'ANY',
                                          'browserName': 'chrome',
                                          'version': '',
                                          'javascriptEnabled': True})
    driver.get("http://www.baidu.com")
    driver.find_element_by_xpath("//input[@id='kw' and @class='s_ipt']").send_keys("hello")
    driver.find_element_by_xpath("//input[@value='百度一下' and @id='su']").click()
    sleep(10)
    driver.quit()
